package me.report.api.web.controller.api;

import javax.servlet.http.HttpServletRequest;
import me.report.api.mongodb.service.MongoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.RedirectView;

@Controller
public class RunReportController {

    @Autowired
    MongoService mongoService;

    @RequestMapping(value = {"report/run/{reportId}"})
    public @ResponseBody
    View runReportById(HttpServletRequest request,
            @PathVariable(value = "reportId") String reportId) {
        return new RedirectView("/admin/report");
    }
}
